/*
 * WeatherUserModel
 *
 * Copyright 2008-2011 Centro Andaluz de Innovacion y Tecnologias de la
 * Informacion y las Comunicaciones (CITIC). All Rights Reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
 *
 * Please contact CITIC - Edificio CITIC, C/ Marie Curie, 6 Parque
 * Tecnologico de Andalucia 29590 - Campanillas, Malaga, Spain
 * or visit www.citic.es, if you need additional information or
 * have any questions.
 */

package es.citic.puedes.weatherservice.impl.tables;

import java.util.Date;

import javax.persistence.*;

@Entity
@Table(name = "weathermanager_weatherusermodel")
public class WeatherUserModel {

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "weatherUserId")
	private Integer weatherUserId;

	@Column(name = "value")
	private Integer value;

	@Column(name = "userId")
	private Integer userId;

	@Temporal(TemporalType.DATE)
	@Column(name = "date")
	private Date date;

	@ManyToOne
	@JoinColumn(name = "weatherlocationId", unique = false, nullable = false, updatable = false)
	private WeatherLocation weatherlocation;

	/**
	 * Empty constructor
	 */
	public WeatherUserModel() {
	}

	/**
	 * Constructor with parameters
	 * 
	 * @param value
	 * @param weatherlocation
	 * @param userId
	 */
	public WeatherUserModel(Integer value, WeatherLocation weatherlocation,
			Integer userId) {

		this.weatherlocation = weatherlocation;
		this.value = value;
		this.userId = userId;
	}

	/**
	 * Constructor with parameters
	 * 
	 * @param value
	 * @param weatherlocation
	 * @param userId
	 * @param date
	 */

	public WeatherUserModel(Integer value, WeatherLocation weatherlocation,
			Integer userId, Date date) {

		this.weatherlocation = weatherlocation;
		this.value = value;
		this.userId = userId;
		this.date = date;
	}

	/**
	 * Get preference date
	 */
	public Date getDate() {
		return this.date;
	}

	/**
	 * Set preference date
	 */
	public void setDate(Date date) {
		this.date = date;
	}

	/**
	 * Get user id
	 */
	public Integer getUserid() {
		return this.userId;
	}

	/**
	 * Set user id
	 */
	public void setUserid(Integer userId) {
		this.userId = userId;
	}

	/**
	 * Get weather user id
	 */
	public Integer getWeatheruserid() {
		return this.weatherUserId;
	}

	/**
	 * Get value count
	 */
	public Integer getValue() {
		return this.value;
	}

	/**
	 * Get WeatherLocation object
	 */
	public WeatherLocation getWeatherlocation() {
		return this.weatherlocation;
	}

	/**
	 * Set weatheruserid
	 */
	public void setWeatheruserid(Integer weatherUserId) {
		this.weatherUserId = weatherUserId;
	}

	/**
	 * Set value count
	 */
	public void setValue(Integer value) {
		this.value = value;
	}

	/**
	 * Set WeatherLocation object
	 */
	public void setWeatherlocation(WeatherLocation weatherlocation) {
		this.weatherlocation = weatherlocation;
	}

}